#include "FKActor.h"

#include "FKWatchingGroup.h"

#include "FKLogger.h"

FK_EVENTS(FKActor){}

FKActor::FKActor(FKRoom* room,qint32 objectID):FKObject(room,objectID){
    FK_CBEGIN
    _watchingGroup=0;
    FK_CEND
}

FKActor::~FKActor(){
    FK_DBEGIN
    FK_DEND
}

void FKActor::win(){
    emit won(this);
}

void FKActor::lose(){
    emit loose(this);
}

void FKActor::setWatchingGroup(FKWatchingGroup *w){
    if(w==_watchingGroup)return;
    if(_watchingGroup)stopTotalWatching(_watchingGroup);
    if(w)setTotalWatching(w);
    _watchingGroup=w;
}
